<UserControl
	x:Name="UserControl"
	x:Class="Goldlight.SampleApplication.Views.NavigationBar"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"
	xmlns:view="clr-namespace:Goldlight.SampleApplication.Views"
	xmlns:vm="clr-namespace:Goldlight.SampleApplication.ViewModels"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	d:DesignHeight="480"
	d:DesignWidth="640"
	
	mc:Ignorable="d">
	<UserControl.Resources>
		<vm:NavigationViewModel x:Key="VM"/>
		<SolidColorBrush x:Key="OutlookButtonForeground" Color="#FF204D89"/>
		<LinearGradientBrush x:Key="OutlookButtonBackground" StartPoint="0.5,0" EndPoint="0.5,1">
			<GradientStop Offset="0" Color="#FFD9EDFF"/>
			<GradientStop Offset="0.445" Color="#FFC0DEFF"/>
			<GradientStop Offset="1" Color="#FFC0D9FB"/>
			<GradientStop Offset="0.53" Color="#FFAFD1F8"/>
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="OutlookButtonHighlight" StartPoint="0.5,0" EndPoint="0.5,1">
			<GradientStop Offset="0" Color="#FFFFBD69"/>
			<GradientStop Offset="0.096" Color="#FFFFB75A"/>
			<GradientStop Offset="0.258" Color="#FFFFB14C"/>
			<GradientStop Offset="0.387" Color="#FFFB8C3C"/>
			<GradientStop Offset="0.967" Color="#FFFEB461"/>
			<GradientStop Offset="1" Color="#FFFEBB67"/>
		</LinearGradientBrush>
		<Style x:Key="OutlookTabControlStyle" TargetType="{x:Type TabControl}">
			<Setter Property="Foreground" Value="{DynamicResource OutlookButtonForeground}"/>
			<Setter Property="Background" Value="{DynamicResource OutlookButtonBackground}"/>
			<Setter Property="BorderBrush" Value="{x:Static Microsoft_Windows_Themes:ClassicBorderDecorator.ClassicBorderBrush}"/>
			<Setter Property="BorderThickness" Value="3"/>
			<Setter Property="Margin" Value="0"/>
			<Setter Property="Padding" Value="1"/>
			<Setter Property="MinWidth" Value="10"/>
			<Setter Property="MinHeight" Value="10"/>
			<Setter Property="HorizontalContentAlignment" Value="Center"/>
			<Setter Property="VerticalContentAlignment" Value="Center"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type TabControl}">
						<Grid ClipToBounds="true" KeyboardNavigation.TabNavigation="Local" SnapsToDevicePixels="true">
							<Grid.RowDefinitions>
								<RowDefinition x:Name="RowDefinition0"  Height="Auto" />
								<RowDefinition x:Name="RowDefinition1" Height="*" />
							</Grid.RowDefinitions>
							<Grid.ColumnDefinitions>
								<ColumnDefinition x:Name="ColumnDefinition0" />
								<ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
							</Grid.ColumnDefinitions>
							<Grid
								x:Name="ContentPanel"
								Grid.Column="0"
								Grid.Row="1"
								KeyboardNavigation.DirectionalNavigation="Contained"
								KeyboardNavigation.TabIndex="2"
								KeyboardNavigation.TabNavigation="Local"
								>
								<Microsoft_Windows_Themes:ClassicBorderDecorator
									Background="{TemplateBinding Background}"
									BorderBrush="{TemplateBinding BorderBrush}"
									BorderStyle="Raised"
									BorderThickness="{TemplateBinding BorderThickness}">
									<ContentPresenter
										x:Name="PART_SelectedContentHost"
										Margin="2,2,2,2"
										ContentSource="SelectedContent"
										SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
										/>
								</Microsoft_Windows_Themes:ClassicBorderDecorator>
							</Grid>
							<StackPanel
								x:Name="HeaderPanel"
								Grid.Row="1"
								Margin="0,-2,0,0"
								VerticalAlignment="Bottom"
								IsItemsHost="True"
								/>
						</Grid>
						<ControlTemplate.Triggers>
							<Trigger Property="TabStripPlacement" Value="Bottom">
								<Setter TargetName="ContentPanel" Property="Grid.Row" Value="0"/>
								<Setter TargetName="RowDefinition0" Property="Height" Value="*"/>
								<Setter TargetName="RowDefinition1" Property="Height" Value="Auto"/>
							</Trigger>
							<Trigger Property="TabStripPlacement" Value="Left">
								<Setter TargetName="ContentPanel" Property="Grid.Row" Value="0"/>
								<Setter TargetName="ContentPanel" Property="Grid.Column" Value="1"/>
								<Setter TargetName="ColumnDefinition0" Property="Width" Value="Auto"/>
								<Setter TargetName="ColumnDefinition1" Property="Width" Value="*"/>
								<Setter TargetName="RowDefinition0" Property="Height" Value="*"/>
								<Setter TargetName="RowDefinition1" Property="Height" Value="0"/>
							</Trigger>
							<Trigger Property="TabStripPlacement" Value="Right">
								<Setter TargetName="ContentPanel" Property="Grid.Row" Value="0"/>
								<Setter TargetName="ContentPanel" Property="Grid.Column" Value="0"/>
								<Setter TargetName="ColumnDefinition0" Property="Width" Value="*"/>
								<Setter TargetName="ColumnDefinition1" Property="Width" Value="Auto"/>
								<Setter TargetName="RowDefinition0" Property="Height" Value="*"/>
								<Setter TargetName="RowDefinition1" Property="Height" Value="0"/>
							</Trigger>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Foreground" Value="{DynamicResource&#xD;&#xA;                                    {x:Static SystemColors.GrayTextBrushKey}}"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="OutlookTabItemStyle" TargetType="{x:Type TabItem}">
			<Setter Property="Padding" Value="12,2,12,2"/>
			<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
			<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
			<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
			<Setter Property="VerticalContentAlignment" Value="Stretch"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type TabItem}">
						<Border
							x:Name="Bd"
							Background="{TemplateBinding Background}"
							BorderBrush="#FF6593CF"
							BorderThickness="1"
							SnapsToDevicePixels="true"
							>
							<ContentPresenter
								HorizontalAlignment="Left"
								Margin="{TemplateBinding Padding}"
								VerticalAlignment="{Binding Path=VerticalContentAlignment,&#xD;&#xA;                                RelativeSource={RelativeSource AncestorType=&#xD;&#xA;                                {x:Type ItemsControl}}}"
								ContentSource="Header"
								RecognizesAccessKey="True"
								SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
						</Border>
						<ControlTemplate.Triggers>
							<Trigger Property="Selector.IsSelected" Value="True">
								<Setter TargetName="Bd" Property="Background" Value="{DynamicResource OutlookButtonHighlight}"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</UserControl.Resources>
	<Grid DataContext="{StaticResource VM}">
		<TabControl
			BorderBrush="#FF6593CF"
			BorderThickness="1,1,1,0"
			Style="{DynamicResource OutlookTabControlStyle}"
			TabStripPlacement="Bottom">
			<TabItem
				Height="30"
				Background="{DynamicResource OutlookButtonBackground}"
				Foreground="{DynamicResource OutlookButtonForeground}"
				Header="{Binding Resources.WorkplaceHeading}"
				Style="{DynamicResource OutlookTabItemStyle}">
				<view:MarketingNavigationView/>
			</TabItem>
			<TabItem
				Height="30"
				Background="{DynamicResource OutlookButtonBackground}"
				Foreground="{DynamicResource OutlookButtonForeground}"
				Header="{Binding Resources.SalesHeading}"
				Style="{DynamicResource OutlookTabItemStyle}">
				<Grid/>
			</TabItem>
			<TabItem
				Height="30"
				Background="{DynamicResource OutlookButtonBackground}"
				Foreground="{DynamicResource OutlookButtonForeground}"
				Header="{Binding Resources.MarketingHeading}"
				Style="{DynamicResource OutlookTabItemStyle}">
				<Grid/>
			</TabItem>
			<TabItem
				Height="30"
				Background="{DynamicResource OutlookButtonBackground}"
				Foreground="{DynamicResource OutlookButtonForeground}"
				Header="{Binding Resources.ServiceHeading}"
				Style="{DynamicResource OutlookTabItemStyle}">
				<Grid/>
			</TabItem>
			<TabItem
				Height="30"
				Background="{DynamicResource OutlookButtonBackground}"
				Foreground="{DynamicResource OutlookButtonForeground}"
				Header="{Binding Resources.SettingsHeading}"
				Style="{DynamicResource OutlookTabItemStyle}">
				<Grid/>
			</TabItem>
			<TabItem
				Height="30"
				Background="{DynamicResource OutlookButtonBackground}"
				Foreground="{DynamicResource OutlookButtonForeground}"
				Header="{Binding Resources.ResourceCentreHeading}"
				Style="{DynamicResource OutlookTabItemStyle}">
				<Grid/>
			</TabItem>
		</TabControl>
	</Grid>
</UserControl>